package com.mdc.mansion.core.common.util;

import com.mdc.mansion.common.util.MD5Utils;
import com.mdc.mansion.dataaccess.common.context.ContextHolder;
import com.mdc.mansion.dataaccess.modules.restaurant.entity.RestaurantStaff;
import com.mdc.mansion.dataaccess.modules.system.entity.User;

public class RestaurantSupport {
    public static User getCurrentOperationUser() {
        RestaurantStaff restaurantStaff = ContextHolder.currentRestaurantStaff();
        if(restaurantStaff!=null){
            String loginAccount = restaurantStaff.getLoginAccount();
            return new User(loginAccount,loginAccount);
        }
        return null;
    }
    public static String createJpushTag(String resturantId,String roleType){
        return MD5Utils.string2MD5(resturantId)+roleType;
    }
}
